<!DOCTYPE html>
<html>
<head>
  <title>props</title>
  <script type="text/javascript" src="../js/vue.js"></script>
</head>
<body>
  <div id="demo">
    <ch :here="message"></ch>
  </div>
  <script type="text/javascript">
    var vm = new Vue({
      el:"#demo",
      data: {
        message:"Xuzhou"
      },
      components:{
        ch:{
          // {{here}}就是ch标签中的属性here插值的形式
          template: `<div style="color:red;">ChenHao from {{here}}</div>`,
          // props注册选项，否则不生效
          props:["here"],
        }
      },
    });
  </script>
</body>
</html>